const db = uniCloud.database()
const dbCmd = db.command
exports.main = async (event, context) => {
	const {
		num = 8,
			page
	} = event

	const collection = db.collection('article')
	const res = await collection.limit(num).skip(num * (page - 1)).orderBy('posttime', 'desc').get()
	return res
};